// page/mine/pages/seleGoods.js

var app = getApp()
var that;
Page({
  data: {
    loadingHidden: false,
    jpshoplist: [],
    page: 1,
    limit: 10,
    kong: true
  },
  onLoad: function(options) { //获取url携带id值
    console.log(options.parductName)
    that = this
    app.getData({
      url: app.api.getShopSele(),
      method: "POST",
      data: {
        page: that.data.page,
        limit: that.data.limit
      },

      ok: function(res) {

        if (res.statusCode == 200 && res.errMsg == 'request:ok') {
          if (res.data.code == 1) {
            if (res.data.list.length == 0) {
              that.setData({
                kong: false,
                loadingHidden: true
              })
            } else {
              that.setData({
                loadingHidden: true,
                jpshoplist: res.data.list
              })
            }
          } else {
            wx.showToast({
              title: res.data.message,
            })
          }
        }
      }
    })


  }
})